//
//  CustomTabItemView.h
//  baojia
//
//  Created by Zing on 14-8-5.
//  Copyright (c) 2014年 com.baojia.www. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "OrderModel.h"

typedef enum TAB_ITEM_TYPE
{
    TAB_ITEM_TYPE_DEFAULT,
    TAB_ITEM_TYPE_CORWIDTH,
}TAB_ITEM_TYPE;

@protocol CustomTabItemViewDelegate;

@interface CustomTabItemView : UIView

@property(nonatomic , assign) id <CustomTabItemViewDelegate> delegate;
@property(nonatomic , assign) TAB_ITEM_TYPE tType;
@property(nonatomic,strong)UILabel *budgeNumLabel;
@property(nonatomic,strong)UIButton *btn;

@property(nonatomic , strong) void(^tabItemSelectedAtIndexBlock)(int index,CustomTabItemView * view);


@property(strong,nonatomic)OrderModel *orderModel;

- (void)tabItemSelectedAtIndexBlock:(void(^)(int index,CustomTabItemView * view)) block;

- (id)initWithFrame:(CGRect)frame type:(TAB_ITEM_TYPE)type;

- (void)initWithItemNames:(NSArray *)itemNames;

- (void)setSelectedIndex:(int)index;

- (void)setItemEnableStatusWithIndex:(int)index status:(BOOL)status;

- (void)initWithLineItemNames:(NSArray *)itemNames;

- (void)initWithNearbyItemNames:(NSArray *)itemNames;

- (void)initWithChooseItemNames:(NSArray *)itemNames;

- (void)initWithBackColorCornerItemNames:(NSArray *)itemNames;

-(void)refreshBugeNum:(NSString *)bugedNum indexButton:(int)index;

@end


@protocol CustomTabItemViewDelegate <NSObject>
@optional
- (void)tabItemSelectedAtIndex:(int)index tabItem:(CustomTabItemView *)view;
-(void)tabItemSelectedAtIndex:(int)index tabButton:(UIButton *)button tabItem:(CustomTabItemView *)view;

@end